import axios from 'axios'

const request = axios.create({
    baseURL:'http://121.89.205.189:3000/api'
}) 

// 请求拦截
request.interceptors.request.use((req) => {
    req.headers.token = localStorage.getItem('token')
    return req
})

// 响应拦截
request.interceptors.response.use((res) => {
    return res.data
})

export default request